/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2023-01-05 14:46:41
 * @LastEditors: Clark
 * @LastEditTime: 2023-01-05 14:46:47
 * @Description: file content
 */

#include "apue.h"
#include <sys/wait.h>

int main()
{
    int status;

    if ((status = system("date")) < 0)
    {
        err_sys("system() error");
    }
    pr_exit(status);

    if ((status = system("nosuchcommand")) < 0)
    {
        err_sys("system() error");
    }
    pr_exit(status);

    if ((status = system("who; exit 44")) < 0)
    {
        err_sys("system() error");
    }
    pr_exit(status);
}
